package com.ssfeng.youxia.services;

import org.springframework.context.EnvironmentAware;
import org.springframework.context.annotation.PropertySource;
import org.springframework.core.env.Environment;
import org.springframework.stereotype.Service;

/**
 * Created by liyuhang on 2019-09-03.
 */
@Service
@PropertySource({
        "classpath:shiroConfig.properties",
        "classpath:mysql.properties",
        "classpath:redis.properties",
        "classpath:fileoperate.properties"
})
public class EnvironmentService implements EnvironmentAware {

    private Environment environment;

    public String getProperty(String name) {
        String property = environment.getProperty(name);
        return property;
    }

    public void setEnvironment(Environment environment) {
        this.environment = environment;
    }
}
